﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<skags.Models.LinksViewModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Tenglar
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="navigation">
<% Html.RenderPartial("LinkNavigation"); %>
<% Html.RenderPartial("LinkCategories"); %>
</div>
<div id="content">
<h2>Tenglalisti</h2>
<%
    if (Model.Count() == 0)
        Response.Write("Engir tenglar til.");
    else
    {
        foreach (var s in Model)
        {
%><h3><%:s.Category.Title%></h3><ul>
    <%
        if (s.Links.Count() == 0)
            Response.Write("Engir tenglar til.");
        else
        {
            foreach (var l in s.Links)
            {%>
<li><a href="<%:l.Url%>" title="<%:l.Title%>" target="_blank"><%:l.Title%></a></li>
            <%
            }
        }
%>
            </ul>
            <%
        }
    }
%>
</div>
</asp:Content>
